package org.turbobytes.unikey.util.db.metadata;

import org.turbobytes.unikey.util.db.model.DataType;

import java.util.List;
import java.util.Arrays;

/**
 * Db metadata operations specific to MySQL
 *
 * @author Ganeshji Marwaha
 * @since Aug 7, 2010
 */
public class MySqlMetadata extends GenericMetadata {

  public List<String> getSupportedDbDataTypes(DataType dataType) {
    switch (dataType) {
      case WHOLE_NUMBER:
        return Arrays.asList("TINYINT", "SMALLINT", "MEDIUMINT", "INT", "INTEGER", "BIGINT");
      case TEXT:
        return Arrays.asList("CHAR", "VARCHAR");
      default:
        throw new IllegalStateException(dataType + " data type is not expected. Developer Error.");
    }
  }  

}
